package com.jbm.jbmsupplier.util;

import java.io.Serializable;

/**
 * Created by lyh on 2017-03-14.
 */
////@Entity
////@Table(name = "points_rule", schema = "", catalog = "jbmcore")
////@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class PointsRuleEntity  extends ICtrl implements Serializable {
    private static final long serialVersionUID = -2735348486425297970L;
    private int ruleId;
    private String code;
    private Integer points;
    private String memo;

    ////@Id
    ////@Column(name = "rule_id")
    ////@GeneratedValue
    public int getRuleId() {
        return ruleId;
    }

    public void setRuleId(int ruleId) {
        this.ruleId = ruleId;
    }

    ////@Basic
    ////@Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    ////@Basic
    ////@Column(name = "points")
    public Integer getPoints() {
        return points;
    }

    public void setPoints(Integer points) {
        this.points = points;
    }

    ////@Basic
    ////@Column(name = "memo")
    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    ////@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PointsRuleEntity that = (PointsRuleEntity) o;

        if (ruleId != that.ruleId) return false;
        if (code != null ? !code.equals(that.code) : that.code != null) return false;
        if (memo != null ? !memo.equals(that.memo) : that.memo != null) return false;
        if (points != null ? !points.equals(that.points) : that.points != null) return false;

        return true;
    }

    ////@Override
    public int hashCode() {
        int result = ruleId;
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (points != null ? points.hashCode() : 0);
        result = 31 * result + (memo != null ? memo.hashCode() : 0);
        return result;
    }
}
